Debugger Hints and Tips
When using Visual Studio to debug RTX64 applications, note the following hints and tips.
Debug Behavior
- If you are unable to debug a RTSS application, make sure the RTX64 Real-Time Debugger is the selected debugger.
- While debugging, only the process being debugged is frozen when a breakpoint is hit. All other Real-time processes along with the Subsystem continue to run.
- In the event that no debugger is specified in Visual Studio, or you do not see the RTX64 Real-Time Debugger in the drop-down after you create a project, try the following:
- Make sure the
IntervalZero.Targets
file is installed in the following directory:
%RTX64COMMON%\DebuggerExtensions\
- Verify that the files
IntervalZeroRtxBaseDm.xaml
andIntervalZeroRemoteRtxBaseDm.xaml
exist in the same directory
NOTE: In RTX64 3.1 and above, the file IntervalZeroRtxBaseDm.xaml
is located in C:\Program Files\IntervalZero\RTX64 SDK\3.1\VSExtentions
If these files exist and you still do not see the RTX64 Real-Time Debugger, try the following:
- Unload the project, right-click on the project and edit the project file
- Make sure the following lines exist near the bottom of the project file:
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Import Project="$(RTX64Common)\DebuggerExtensions\IntervalZero.targets"
Condition="exists('$(RTX64Common)\DebuggerExtensions\IntervalZero.targets')" />
NOTE: In RTX64 3.1 and above, the path to the DebuggerExtensions changed from (RTX64Common)\DebuggerExtensions\ to C:\Program Files\IntervalZero\RTX64 SDK\3.1\VSExtentions
You must update the above code accordingly.
- If you receive an error message when you start debugging, make sure:
- The Subsystem is running. The Subsystem must be running before you can start a Visual Studio debugging session.
- The RtssDebug x64 configuration is selected
- In the Visual Studio Extensions and Updates dialog (Tools > Extensions and Updates), make sure the RTX64 Real-Time Debugger is listed as an extension, and that it is both enabled and installed.
- The RTX64 Real-Time Debugger does not allow disassembly/single step of RTX64 system calls (for operational security such as atomic sections).
- The RTX64 Real-Time Debugger does not display the Process ID (PID) for RTSS processes being debugged. A GUID is displayed instead. This is expected behavior when Visual Studio is used to debug a non-Windows process. The PID is displayed in the Output window.
- Deterministic behavior does not exist while using the RTX64 Real-Time Debugger. As a result, RTX64 users should not depend on the execution order of multiple RTSS applications being debugged by multiple RTX64 Visual Studio Debugger instances.
- The RTSS thread priority shown in the Visual Studio Debugger Threads window will display Unknown if the real-time priority value does not correspond to a Windows thread priority. RTSS thread priority values range from 0 to 127 and Windows thread priorities range from -15 to 15. If a real-time priority value matches a Windows value, the text displayed in the debugger Threads window will not be meaningful.
- You can step into the functions exported by RTDLL, but cannot step into or set a break pointer in DllMain function.
- You need to close the Visual Studio debugging session before you stop the RTX64 Subsystem.
- Breakpoints are not allowed in an Interrupt Service Routine (ISR).
- AVX2 is not supported by Visual Studio 2015. As a result, there is no way to view the AVX2 registers in the RTX64 Real-Time Debugger.